package com.java.example;

import com.java.example.org.Student;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Controller;

@Controller
public class StudentBeans {
    @Bean("stu1")
    public Student student(){
        Student student1 = new Student();
        student1.setStudentId(1);
        student1.setStudentName("小样");
        return student1;
    }
}
